#pragma once
#include "Item.h"
#include "Tools/Ref.h"
namespace SakuraAge {
template <typename T>
class Needed : public RefBase {
 private:
  ObjRef<Component> component;

 public:
  T* GetComponent();
};
template <typename T>
inline T* Needed<T>::GetComponent() {
  if (component == nullptr) {
    DebugLogError("Don't have needed class.");
  }
  return (T*)component;
}
}  // namespace SakuraAge